
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<body>
	<ui:composition>
	
		
		<p:toolbar
			style="font-size:0.7em;font-weight:normal;background:white;border:0px;">
			
			<p:toolbarGroup align="right">
				<h:panelGroup>
					<p:commandLink oncomplete="shoppingCartDlg.show()" update=":dialogForm" rendered="#{!shoppingCartModel.isBasketEmpty}">
						<h:outputText value="#{msgs.myShoppingCart}  " />
						<h:outputLabel value="#{shoppingCartModel.totalChargeLabel}">
							<f:convertNumber type="currency" currencySymbol="$"
								minFractionDigits="2" />
						</h:outputLabel>
					</p:commandLink>
				</h:panelGroup>
				<h:panelGroup rendered="#{userModel.authenticatedUser!=null}">
					<p:spacer style="width:10px" />
					<p:commandLink value="#{msgs.myOrders}" type="submit" action="/user/myOrders.xhtml?faces-redirect=true" />
				</h:panelGroup>
				<h:panelGroup rendered="#{userModel.authenticatedUser!=null}">
					<p:spacer style="width:10px" />
					<p:commandLink value="#{msgs.myInfo}" type="submit" action="/user/myInfo.xhtml?faces-redirect=true" />
				</h:panelGroup>
				<h:panelGroup rendered="#{userModel.authenticatedUser!=null}">
					<p:spacer style="width:10px" />
					<p:commandLink value="#{msgs.changePassword}" type="submit" action="/user/changePassword.xhtml?faces-redirect=true" />
				</h:panelGroup>
				<h:panelGroup rendered="#{userModel.authenticatedUser!=null}">
					<p:spacer style="width:10px" />
					<p:commandLink value="#{msgs.logOut}" ajax="true" immediate="true"
					update=":centerForm,:headerForm" actionListener="#{userController.logOutCurrent}" />
				</h:panelGroup>
				<h:panelGroup rendered="#{userModel.authenticatedUser==null}">
					<p:spacer style="width:10px" />
					<p:commandLink value="#{msgs.login}" oncomplete  ="loginDlg.show()" update=":dialogForm" />
				</h:panelGroup>
				<p:spacer style="width:10px" />
				<h:selectOneMenu value="#{viewController.language}" onchange="submit()"
					rendered="#{userModel.authenticatedUser == null}">
					<f:selectItems value="#{userModel.availableLanguages}"
						var="language" itemValue="#{language}"
						itemLabel="#{language.label}"></f:selectItems>
				</h:selectOneMenu>			
			</p:toolbarGroup>
		</p:toolbar>
	</ui:composition>
</body>
</html>
